function Toolbox() {
    var _this = this;
    var page;
    _this.obj = null;
    _this.templateArr = [];
    _this.page_size = 10;

    // init
    _this.init = function(_page) {
        page = _page;
        _this.initTable();
    }

    _this.initTable = function() {
        var list_url = appPath + "/student/toolbox/list";
        page.init("toolbox_form", list_url, "toolbox_list", "toolbox_page", 1, _this.page_size);
        page.goPage(1);
        page.list = function(dataList){
            _this.obj = dataList;
            if(dataList == null){
                return;
            }
            var len = dataList.length;
            var inner = "", item;
            for(var i=0; i< len; i++) {
                item = dataList[i];
                inner += '<tr>';
                inner += '<td width="30">' + (i+1) + '</td>';
                inner += '<td width="200">'+ item['projectName'] + '</td>';
                inner += '<td width="140">'+ item['beginTime'] + '</td>';

                //培训学时
                if(null==item['totalStudyHour']){
                    inner += '<td width="80">'+ TimeUtil.getHouAndMinAndSec(0) + '</td>';
                } else {
                    inner += '<td width="80">'+ TimeUtil.getHouAndMinAndSec(item['totalStudyHour']) + '</td>';
                }

                //考试成绩
                if(null==item['score']){
                    inner += '<td width="80">\\</td>';
                } else {
                    inner += '<td width="80">'+ item['score'] + '</td>';
                }

                //考试状态
                if(null==item['isPassed']){
                    inner += '<td width="80">未考试</td>';
                } else if(0==item['isPassed']){
                    inner += '<td width="80">合格</td>';
                } else {
                    inner += '<td width="80">不合格</td>';
                }

                inner += '</tr>';
            }
            return inner;
        }
    };
}

var toolbox = new Toolbox();